import { createRouter, createWebHashHistory } from 'vue-router'

import Layout from '@/pages/layout.vue'

const routes = [
  {
    path: '/',
    component: Layout,
    children: [
      {
        path: 'css/:name',
        name: 'css',
        component: () => import('@/pages/css/index.vue'),
      },
      {
        path: 'algorithm/:name',
        name: 'algorithm',
        component: () => import('@/pages/algorithm/index.vue'),
      },
    ],
  },
]
const router = createRouter({
  history: createWebHashHistory(),
  routes,
})

export default router
